package globulin.soundFXProccessing;

import jgame.platform.JGEngine;

/**
 * Play a sound effect on demand.
 *
 * @author Jonathan Horvath
 */
public class SoundFX implements Runnable {

    private JGEngine engine;
    private String clipid;

    /**
     * Default constructor
     * 
     * @param engine    The game engine used to play audio
     * @param clipid    The id of the audio clip
     */
    public SoundFX(JGEngine engine, String clipid) {
        this.engine = engine;
        this.clipid = clipid;

    }

    public void run() {
        engine.playAudio(clipid);
    }

}
